﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcApplication1.Controllers
{
    public class HomeController : Controller
    {
        private static double _temp = 0.0;
        private static DateTime _updateTime;

        public ActionResult Index()
        {
            ViewBag.Message = _temp + " - " + _updateTime;

            return View();
        }

        public ActionResult set(double temp)
        {
            _temp = temp;
            _updateTime = DateTime.Now;
            return RedirectToAction("Index");
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
